package model;

/*
 * czy nie lepiej zastąpić String'iem
 */
@Deprecated
public class Literal {

	private String name;
	private State state;

	public Literal(String _name, State _state) {
		this.name = new String(_name);
		this.state = _state;
	}
	
	public Literal(String line) throws NullPointerException {
		String[] tmp = line.split(";");
		this.name = tmp[0];
		this.state = State.valueOf(tmp[1]);
	}

	public String getName() {
		return new String(this.name);
	}

	public State getState() {
		return this.state;
	}

	public void setState(State s) {
		this.state = s;
	}

	public String toString() {
		return "Literal name: " + this.name + " state: " + this.state;
	}
}
